import request from '@/utils/request'

export function getDangerList(query) {
  return request({
    url: '/danger/getDangerList',
    //url: '/danger/page',
    method: 'get',
    params: query
  })
}

export function addDanger(data) {
  return request({
    url: '/danger/addDanger',
    method: 'post',
    data
  })
}

export function updateDanger(data) {
  return request({
    url: '/danger/updateDanger',
    method: 'put',
    data
  })
}

export function deleteDanger(id) {
  return request({
    url: '/danger/delete/' + id,
    method: 'delete'
  })
}

export function getProvinceOpt() {
  return request({
    url: '/danger/getProvinceOpt',
    method: 'get'
  })
}

export function getCityOrZoneOpt(parentid) {
  return request({
    url: '/danger/getCityOrZoneOpt/' + parentid,
    method: 'get'
  })
}

